<?php echo $header; ?>
<div id="content">
    <div class="breadcrumb">
        <?php echo $this->breadCrumbs(); ?>
    </div>
    <?php if ($success) { ?>
    <div class="success"><?php echo $success; ?></div>
    <?php } ?>
    <div class="box">
        <div class="heading">
            <h1><img src="view/image/user.png" alt="" /> <?php echo "qq客服"; ?></h1>
            <div class="buttons"><a onclick="location = '<?php echo UA('tool/livechat/insertqq'); ?>'" class="button"><?php echo $_['button_insert']; ?></a>
                <a onclick="$('#form1').attr('action', '<?php echo UA('tool/livechat/deleteqq'); ?>'); $('form').submit();" class="button"><?php echo $_['button_delete']; ?></a>
                <a onclick="$('#form1').attr('action', '<?php echo UA('tool/livechat/launchqq'); ?>'); $('form').submit();" class="button"><?php echo $_['button_use']; ?></a></div>
            <!--"location = '<?php echo UA('tool/livechat/launchqq'); ?>'"   -->
        </div>
        <div class="content">
            <form action="" method="post" enctype="multipart/form-data" id="form1">
                <table class="list">
                    <thead>
                    <tr>
                        <td width="1" style="text-align: center;"><input type="checkbox" onclick="$('input[name*=\'selecte\']').attr('checked', this.checked);"/></td>
                        <td class="left" width="190"><?php echo $_['column_name']; ?></td>
                        <td class="left" width="130"><?php echo "qq号"; ?></td>
                        <td class="left"><?php echo $_['column_image']; ?></td>
                        <td class="left" width="100"><?php echo $_['column_status']; ?></td>
                        <td class="right" width="100"><?php echo $_['column_action']; ?></td>
                    </tr>
                    </thead>
                    <tbody>
                    <?php if ($qqs) { ?>
                    <?php foreach ($qqs as $qq) { ?>
                    <tr>
                        <td style="text-align: center;">
                            <input type="checkbox" name="selecte[]" value="<?php echo $qq['qqNumber'] ; ?>" ?>
                        </td>
                         <td class="left"><?php echo $qq['qqName'];?></td>
                        <td class="left"><?php echo $qq['qqNumber'];?></td>
                        <td class="left">
                            <?php if ($qq['imgName']) { ?>
                            <img src="<?php echo $qq['imgName']; ?>" />
                            <?php } ?>
                        </td>
                        <td class="left"><?php echo $qq['qqStatus'] == 1 ? $_['text_enabled'] : $_['text_disabled'];?></td>
                        <td class="right"><?php foreach ($qq['action'] as $action) { ?>
                            [ <a href="<?php echo $action['href']; ?>"><?php echo $action['text']; ?></a> ]
                            <?php } ?></td>
                    </tr>
                    <?php } ?>
                    <?php } else { ?>
                    <tr>
                        <td class="center" colspan="9"><?php echo $_['text_no_results']; ?></td>
                    </tr>
                    <?php } ?>
                    </tbody>
                </table>
            </form>
            <div class="buttons">
                <a onclick="$('#form1').attr('action', '<?php echo UA('tool/livechat/index');?>');$('#form1').submit();" class="button"><?php echo $_['button_update']; ?></a>
            </div>

        </div>
    </div>
</div>
<?php echo $footer; ?>